#version 330

in vec4 osg_Vertex;
in vec3 osg_Normal;
in vec4 osg_Color;
in vec2 osg_MultiTexCoord0;

out vec3 vN;
out vec3 vP;
out vec2 vUV;
out vec4 vColor;


uniform mat3 osg_NormalMatrix;
uniform mat4 osg_ModelViewMatrix;
uniform mat4 osg_ModelViewProjectionMatrix;

void main()
{
	vP = (osg_ModelViewMatrix * osg_Vertex).xyz;
	vN = normalize(osg_NormalMatrix * osg_Normal);
	
	vColor = osg_Color;
	vUV = osg_MultiTexCoord0;

	gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
}